package com.net.oil.main.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.main.contract.NewAccountCouponContract;
import com.net.oil.main.model.NewAccountCouponModel;

/**
 * 作者：lch
 * 时间：2019/4/21 0021:上午 11:35
 * 邮箱：245850413@qq.com
 * 说明：
 */
public class NewAccountCouponPresenter extends BasePresenter<NewAccountCouponContract.View> implements NewAccountCouponContract.Presenter {

    private NewAccountCouponContract.Model model;
    private NewAccountCouponContract.View view;

    public NewAccountCouponPresenter(NewAccountCouponContract.View view) {
        this.view = view;
        model = new NewAccountCouponModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getNewAccountCoupon(int id) {
        model.getNewAccountCoupon(id);
    }

    @Override
    public void getNewAccountCouponSuccess() {
        view.getNewAccountCouponSuccess();
    }

    @Override
    public void getNewAccountCouponFailed() {
        view.getNewAccountCouponFailed();
    }
}
